package com.brillilab.domain.vo.account;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang.StringUtils;

import com.brillilab.domain.enums.account.IntegralStateEnum;
import com.brillilab.domain.enums.account.IntegralTypeEnum;

import lombok.Data;

@Data
public class AccountDetailedVo implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 类型：1加，2减，3文本，4其他
	 */
	private int type;
	/**
	 * 积分类型
	 */
	private int integralType;
	/**
	 * 积分类型名称
	 */
	private String typeName;

	/**
	 * 积分
	 */
	private int integral;

	/**
	 * 明细时间
	 */
	private Date detailedTime;

	/**
	 * 兑换码
	 */
	private String exchangeCode;

	public String getTypeName() {
		typeName = IntegralTypeEnum.getKey(integralType);
		if (StringUtils.isBlank(typeName)) {
			typeName = "提现";
		}
		return typeName;
	}

}
